﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Chapter9f.aspx.cs" Inherits="AJAX_learning.Chapter9.Chapter9f" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
</head>
<body>
	<form id="form1" runat="server">
	<asp:ObjectDataSource ID="SourceEmployees" runat="server" TypeName="AJAX_learning.EmployeeDb"
		SelectMethod="GetEmployees">
	</asp:ObjectDataSource>
	<asp:ObjectDataSource ID="SourceEmployee" runat="server" SelectMethod="GetEmployee" DataObjectTypeName="AJAX_learning.EmployeeDetails" UpdateMethod="UpdateEmployee"
		TypeName="AJAX_learning.EmployeeDb" OnSelecting="SourceEmployeeOnSelecting">
		<SelectParameters>
			<asp:ControlParameter ControlID="ListBox1" Name="employeeId" PropertyName="SelectedValue" />
		</SelectParameters>
	</asp:ObjectDataSource>
	<div>
		<asp:ListBox ID="ListBox1" runat="server" DataSourceID="sourceEmployees" DataTextField="EmployeeID"
			Rows="10" AutoPostBack="true"></asp:ListBox>
		<br />
		<br />
		<asp:DetailsView ID="EmployeeDetails" runat="server" DataSourceID="SourceEmployee" AutoGenerateRows="true" AutoGenerateEditButton="true">
		</asp:DetailsView>
		
	</div>
	</form>
</body>
</html>
